package springboot.bigdata.demo.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import springboot.bigdata.demo.dao.UserItemConfigDao;
import springboot.bigdata.demo.mappers.db0.DB0UserItemConfigMapper;
import springboot.bigdata.demo.mappers.db1.DB1UserItemConfigMapper;
import springboot.bigdata.demo.model.UserItemConfig;

@Component
public class UserItemConfigDaoImpl implements UserItemConfigDao {

    @Autowired
    private DB0UserItemConfigMapper db0UserItemConfigMapper;
    @Autowired
    private DB1UserItemConfigMapper db1UserItemConfigMapper;

    @Override
    public UserItemConfig add(UserItemConfig userItemConfig) {

        db0UserItemConfigMapper.insertSelective(userItemConfig);
        db1UserItemConfigMapper.insertSelective(userItemConfig);

        return userItemConfig;
    }
}
